<?php
/**
 * True Gallery Send-To-Friend template file
 *
 * @version 2.5
 * @author Alexey N. Brin (userxp@joomlaportal.ru)
 * @homepage http://truegallery.ru 
 * @filename send2friend.tpl.php
 * @package True Gallery
 * @copyright (C) 2008-2009 by joomlatune.ru
 * @license GNU/GPL: http://www.gnu.org/copyleft/gpl.html
 * 
 * THIS GALLERY is an EVOLUTION of AkoGallery -> PonyGallery -> DatsoGallery
 *
 * If you fork this to create your own project, 
 * please make a reference to True Gallery someplace in your code 
 * and provide a link to http://www.joomlatune.ru
 *
 * LAST UPDATED 29.03.2009 15:44 IEV
 **/

defined('_VALID_MOS') or defined('_JEXEC') or die('Direct Access to this location is not allowed.');

?>
<script type="text/javascript">
function validatesend2friend(){
	if( ( document.send2friend.send2friendname.value=='') || (document.send2friend.send2friendemail.value=='') ) {
		alert("<?php echo JText::_('TG_ENTER_NAME_EMAIL'); ?>");
		return false;
	} else {
		document.send2friend.action = 'index.php'; // is it ???
		document.send2friend.submit();
	}
}
</script>

<form method="post" name="send2friend" action="<?php echo $link; ?>">
	<input type="hidden" name="option" value="<?php echo TG_CMP; ?>" />
	<input type="hidden" name="catid" value="><?php echo $lo->catid; ?>" />
	<input type="hidden" name="id" value="<?php echo $lo->id; ?>" />
	<input type="hidden" name="task" value="<?php echo $lo->task; ?>" />
	<input type="hidden" name="view" value="<?php echo $lo->view; ?>" />
	<input type="hidden" name="from2friendname" value="<?php echo $s2y[0]->name; ?>" />
	<input type="hidden" name="from2friendemail" value="<?php echo $s2y[0]->email; ?>" />
	
	<table width="100%" border="0" cellspacing="0" cellpadding="3" style="margin-left: 10px;">
		<tr>
			<td class="sectiontableheader" colspan="2"><?php echo JText::_('TG_SEND_FRIEND'); ?></td>
		</tr>
		<tr class="sectiontableentry1">
			<td width="30%" valign="top"><strong><?php echo JText::_('TG_YOUR_NAME'); ?>:</strong></td>
			<td valign="top"><?php echo $s2y[0]->name; ?></td>
		</tr>
		<tr class="sectiontableentry2">
			<td valign="top"><strong><?php echo JText::_('TG_YOUR_MAIL'); ?>:</strong></td>
			<td valign="top"><?php echo $s2y[0]->email; ?></td>
		</tr>
		<tr class="sectiontableentry1">
			<td valign="top"><strong><?php echo JText::_('TG_FRIENDS_NAME'); ?>:</strong></td>
			<td valign="top"><input type="text" name="send2friendname" size="15" class="inputbox" /></td>
		</tr>
		<tr class="sectiontableentry2">
			<td valign="top"><strong><?php echo JText::_('TG_FRIENDS_MAIL'); ?>:</strong></td>
			<td valign="top"><input type="text" name="send2friendemail" size="15" class="inputbox" />
			</td>
		</tr>
		<tr class="sectiontableentry1">
			<td colspan="2" valign="top">
			<input type="button" name="send" value="<?php echo JText::_('TG_SEND'); ?>" class="button" onclick="validatesend2friend()" /></td>
		</tr>
	</table>
</form>
<?php

?>